#ifndef __MATCH_H__
#define __MATCH_H__

#include "stdfx.h"

class Player;
class Turn;
class PinScheme;
class PinScheme;

class Match
{
public:
    
    Match();
    ~Match();
    void attachPlayer(std::shared_ptr<Player> player);
    //void detachPlayer(std::unique<Player> player);
    bool isDone() const;
    
    void printPlayersScores() const;

private:
    void makeTurn(const PinScheme& scheme);
    void onTurn(PinScheme scheme);   // event
    
private:
    std::list<std::shared_ptr<Player>> _players;
    std::list<std::shared_ptr<Player>>::iterator _currentPlayerIter;
    bool _isDone;
    connection_t _connection;
};

#endif